<%@ page import="java.util.Map" %>
<%@ page import="java.util.Arrays" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.ArrayList" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page contentType="text/html;charset=UTF-8" language="java"  pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="spring" uri="/WEB-INF/lib/spring.tld"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="f" %>
<%@ taglib prefix="z" uri="/WEB-INF/lib/zerdoor.tld"%>
<c:set value="${pageContext.request.contextPath}" var="path" scope="page"/>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><spring:message code='task_info.title.employConfirm' /></title>

    <link href="${path}/style/acg/css/style.css" rel="stylesheet" type="text/css" />
    <script src="${path}/js/jquery.min.js" type="text/javascript"></script>
    <%--<script type="text/javascript" src="${path}/style/acg/js/common.js"></script>--%>


    <script type="text/javascript">



    </script>
</head>

<body>
<div class="header">
    <jsp:include page="../public/header.jsp">
        <jsp:param    name="home"    value="dddd"    />
    </jsp:include>
</div>

<div id="container">
    <div class="wrapper">
    	<div class="referbidbox">
        	<div class="refer_step step2">
            	<ul>
                    <li><spring:message code='task_info.msg.descriptionDemand' /></li>
                    <li class="now"><spring:message code='task_info.msg.identificationOfNeeds' /></li>
                    <li class="last"><spring:message code='task_info.msg.demandRelease' /></li>
                </ul>
            </div>
        	<div class="referform nomorder">
            	<div class="referSure">
                    <ul>
                        <li class="formli">
                            <dl class="clearfix">
                                <dt><spring:message code='task_info.msg.projectTitle' /></dt>
                                <dd>
                                    <h1>${taskInfoMap.title}</h1>
                                </dd>
                            </dl>
                        </li>
                        <li class="formli">
                            <dl class="clearfix">
                                <dt><spring:message code='task_info.msg.itemDescription' /></dt>
                                <dd>
                                    <div class="referSure_con">
                                        ${taskInfoMap.description}
                                    </div>
                                    <div class="referSure_tit"><spring:message code='task_info.msg.projectPictures' /></div>
                                    <div class="referSure_img clearfix">

                                        <%
                                            String[] srcs = ((Map)request.getAttribute("taskInfoMap")).get("item_pic").toString().split(",");

                                            request.setAttribute("srcList",srcs);
                                        %>

                                        <c:forEach var="tempSrc" items="${srcList}">
                                            <img src="${path}/${tempSrc}" width="120" height="120" />
                                        </c:forEach>
                                    </div>
                                </dd>
                            </dl>
                        </li>
                        <li class="formli">
                            <dl class="clearfix">
                                <dt><spring:message code='task_info.msg.postAttachments' /></dt>
                                <dd>
                                    <%
                                        String[] tempAttachments = ((Map)request.getAttribute("taskInfoMap")).get("attachment").toString().split(",");

                                        List<String> fileNames = new ArrayList<String>();

                                        for(String url : tempAttachments){
                                            if(!"".equals(url)){

                                                String[] names = url.split("/");

                                                fileNames.add( names[names.length - 1]);
                                            }
                                        }

                                        request.setAttribute("attachments",fileNames);
                                    %>

                                    <c:forEach var="tempSrc" items="${attachments}">

                                        <p><span class="referSure_files">${tempSrc}</span></p>

                                    </c:forEach>

                                </dd>
                            </dl>
                        </li>
                        <li class="formli">
                            <dl class="clearfix">
                                <dt><spring:message code='task_info.msg.category' /></dt>
                                <dd class="clearfix">
                                    ${taskInfoMap.first_class} > ${taskInfoMap.second_class}
                                </dd>
                            </dl>
                        </li>

                        <li class="formli">
                            <dl class="clearfix">
                                <dt><spring:message code='task_info.msg.demandStyle' /></dt>
                                <dd class="clearfix">
                                    ${taskInfoMap.style}
                                 </dd>
                            </dl>
                        </li>
                        <li class="formli">
                            <dl class="clearfix">
                                <dt><spring:message code='task_info.msg.tenderPrices' /></dt>
                                <dd class="clearfix">
                                    ￥${taskInfoMap.budget}
                                 </dd>
                            </dl>
                        </li>

                        <%--<li class="formli">--%>
                            <%--<dl class="clearfix">--%>
                                <%--<dt>项目周期</dt>--%>
                                <%--<dd class="clearfix">--%>
                                    <%--${taskInfoMap.cycle}天--%>
                                 <%--</dd>--%>
                            <%--</dl>--%>
                        <%--</li>--%>



                    </ul>
                </div>
                <div class="referSure_money">
                	<ul>
                    	<li>
                        	<dl class="clearfix">
                            	<dt><spring:message code='task_info.msg.feeSchedule' /></dt>
                                <dd>

                                    <p><spring:message code='task_info.msg.hostedDeposit' />：￥${taskInfoMap.budget} × ${taskInfoMap.depositScale}%＝${taskInfoMap.budget * taskInfoMap.depositScale / 100}</p>

                                    <p><b class="color_red"><spring:message code='task_info.msg.totalCharges' />：￥${taskInfoMap.budget * taskInfoMap.depositScale / 100 }</b></p>


                                </dd>
                            </dl>
                        </li>
                        <li class="formli">
                            <dl class="clearfix">
                                <dt>&nbsp;</dt>
                                <dd class="clearfix">
                                    <input type="button" id="" name="" value="<spring:message code='task_info.button.goBack' />" class="fl submitprev" onclick="javascript:history.back(-1);"  />
                                    <input type="submit" id="" name="" value="<spring:message code='task_info.button.postedDemandAndPay' />" class="fl submitorg" onclick="javascript:window.location='${path}/taskInfo/publishAndPay.html?taskId=${taskInfoMap.item_id}'" />
                                 </dd>
                            </dl>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
</div>
<div id="footer">
    <!--content-->
    <jsp:include page="../public/footer.jsp"></jsp:include>
</div>
</body>
</html>
